package main.pojo;

import java.util.Date;

/**
 * 菜品口味关系表
 * @TableName DISH_FLAVOR
 */
public class DishFlavor {
    /**
     * 主键
     */
    private String id;

    /**
     * 菜品
     */
    private String dishId;

    /**
     * 口味名称
     */
    private String name;

    /**
     * 创建者
     */
    private String creator;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 更新者
     */
    private String updater;

    /**
     * 更新时间
     */
    private Date updateDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDishId() {
        return dishId;
    }

    public void setDishId(String dishId) {
        this.dishId = dishId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DishFlavor that = (DishFlavor) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (dishId != null ? !dishId.equals(that.dishId) : that.dishId != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (creator != null ? !creator.equals(that.creator) : that.creator != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (updater != null ? !updater.equals(that.updater) : that.updater != null) return false;
        return updateDate != null ? updateDate.equals(that.updateDate) : that.updateDate == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (dishId != null ? dishId.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (creator != null ? creator.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (updater != null ? updater.hashCode() : 0);
        result = 31 * result + (updateDate != null ? updateDate.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "DishFlavor{" +
                "id='" + id + '\'' +
                ", dishId='" + dishId + '\'' +
                ", name='" + name + '\'' +
                ", creator='" + creator + '\'' +
                ", createDate=" + createDate +
                ", updater='" + updater + '\'' +
                ", updateDate=" + updateDate +
                '}';
    }
}